<?php
class bannerComponent extends sfComponent{
	public function execute($request){
		$cates		= ProductCates::getDataListFrontEnd();
		$data['banners'] = array();
		foreach($cates as $cat){
			$data['banners'][] = Products::getDataListFrontEnd(array('filter_cate_id' => $cat['id'], 'filter_sort_order' => Products::FILTER_SORT_ATTRIBUTE_HOT), array('page'=> 1, 'limit' => 1));
		}
		#echo '<pre>'; print_r($data['banners']);die;
		$this->setVar('data', $data);
	}
}